package com.ny.demo;

public class Test {
    public static void main(String[] args) {
        Vehicle[] vehicles = new Vehicle[4];
        vehicles[0] = new Car("宝马", "X5");
        vehicles[1] = new Bike("山地公路自行车", "shif");
        vehicles[2] = new Car("奔驰", "C级");
        vehicles[3] = new Bike("山地公路竞赛自行车", "shif22");
        for (Vehicle vehicle : vehicles) {
            vehicle.drive();
        }
    }

}
